Repository navigation
test(aggregator): executable /aa chart zoom/pan viewBox coverage (#9581) - #9582
Conversation
Extract the pure chart viewBox math from the AA explorer inline script into aa-explorer-computations.js (parse/clamp/zoom/pan/reset/click-suppression, #7562 pattern); the browser enhancer delegates to it with no inline copies. Add executable tests asserting resulting viewBox values for focal anchoring, the 16x floor, zoom-out-to-base clearing state, pan clamping, and reset, plus the click-suppression contract, and pin the delegation in aa.test.ts.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 35 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Codex disposition (task 16124): the Codex code review on this PR failed to run — usage limits, per the Codex Review Summary comment above (2026-11-13T15:51Z, commit 2e9dc9d). There are no Codex findings or review threads on this PR to disposition; this matches the fleet-wide Codex usage-limit state first seen 2026-11-13T13:51Z. CodeRabbit likewise rate-limited (NEUTRAL). Merge proceeds on local verification: aggregator bun suites 15/15 + 47/47 + 82/82 and a tsc error set identical to main. |
Closes #9581. Task task 16124 (lane code-a).
What
The /aa chart zoom/pan layer from #4154 was covered only by string-presence assertions in aa.test.ts — no test executed the behavior or asserted a resulting viewBox.
Following the #7562 pattern, the pure viewBox math moves out of the explorer's inline script into the shared, tested module
src/assets/aa-explorer-computations.js:parseChartViewBox,effectiveChartView,clampChartView,zoomChartView,panChartView,resetChartView,chartClickSuppressed(new, with .d.ts declarations)render.ts: the enhancer's zoom/pan/reset/click handlers now delegate to those module functions — no inline copies, so the tests exercise exactly the code the browser runs. No behavior change: the math is line-for-line the previous inline code.Tests (oracle: the #9581 acceptance criteria)
New executable tests in
test/aa-explorer-computations.test.tsdrive the module functions and assert resulting viewBox values:curnull, effective view = base)test/aa.test.tsadditionally pins that the shipped page imports these functions from the computations module and carries no inline definitions of them.Verification
bun test test/aa-explorer-computations.test.ts— 15/15 pass (9 new)bun test test/aa.test.ts— 47/47 pass (run with PM_AGG_FRESHNESS_PORT=4899: the default freshness port 4871 is held by the laptop's production aggregator, a pre-existing environment collision unrelated to this change)bun test test/render.test.ts test/a11y-1215.test.ts test/epic-graph.test.ts— 82/82 passbunx tsc --noEmit— error set identical to main (22 pre-existing, none in touched files)Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.